#ifndef									__MANUALCONNECT_H__
#define									__MANUALCONNECT_H__

#include								<QtWidgets/QDialog>
#include								<QtGui/QCloseEvent>
#include								<QtWidgets/QVboxLayout>
#include								<QtWidgets/QHboxLayout>
#include								<QtWidgets/QLabel>
#include								<QtWidgets/QLineEdit>
#include								<QtWidgets/QPushButton>
#include								<iostream>

class									ManualConnect : public QDialog
{
	Q_OBJECT
public:
	ManualConnect(QWidget *);
	~ManualConnect();

private:
	QLineEdit							*_ipLine;
	QLineEdit							*_portLine;
	QPushButton							*_cancelButton;

public:
	QPushButton							*_connectButton;

public:
	void								init();
	const QString						getIp() const;
	const QString						getPort() const;
	bool								isInfoFilled();
	quint16								isInfoValid();
	void								connectError(quint16 error = 0);

protected:
	void								closeEvent(QCloseEvent *);

	public slots:
		void							closeDialog();
};

#endif									//!__MANUALCONNECT_H__